Conversation
src/Dapi/DapiApp.cs
Outdated
| /// <summary> | ||
| /// createACHPull talks to the CreateACHPull endpoint of Dapi, with this DapiApp's appSecret. | ||
| /// </summary> | ||
| /// | ||
| /// <param name="transfer"> | ||
| /// the details of the transfer that should be initiate. | ||
| /// </param> | ||
| /// <param name="accessToken"> | ||
| /// retrieved from the ExchangeToken process. | ||
| /// </param> | ||
| /// <param name="userSecret"> | ||
| /// retrieved from the user login. | ||
| /// </param> | ||
| public CreateACHPullResponse createACHPull(ACH.ACHPull transfer, string accessToken, string userSecret) { | ||
| return this.c.createACHPull(transfer, accessToken, userSecret, "", null); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// createACHPull talks to the CreateACHPull endpoint of Dapi, with this DapiApp's appSecret. | ||
| /// </summary> | ||
| /// <param name="userSecret"> | ||
| /// retrieved from the user login. | ||
| /// </param> | ||
| public GetACHPullResponse getACHPull(string accessToken, string userSecret) { | ||
| return this.c.getACHPull(accessToken, userSecret, "", null); | ||
| } | ||
|
|
There was a problem hiding this comment.
Move them to be after the getAccountsMetadata method.
There was a problem hiding this comment.
Both methods should have 2 versions, one that has the operationID and userInputs parameters, and one that doesn't.
There was a problem hiding this comment.
Also, in the case of getACHPull, the operationID has to be always passed, as it's a required field for the endpoint.
src/Dapi/Products/ACH.cs
Outdated
| return respBody ?? new GetACHPullResponse("UNEXPECTED_RESPONSE", "Unexpected response body"); | ||
| } | ||
|
|
||
| public class ACHPull { |
src/Dapi/Products/ACH.cs
Outdated
| this.senderID = transfer.senderID; | ||
| this.amount = transfer.amount; | ||
| this.description = transfer.description; |
There was a problem hiding this comment.
This will not work. These fields should be inside the transfer object field, not directly in the root.
| /// This is a private constructor to this lib. | ||
| /// </summary> | ||
| [JsonConstructor] | ||
| internal CreateACHPullResponse(APIStatus status, bool success, string operationID) : |
There was a problem hiding this comment.
This constructor is missing the userInputs, type and msg fields.
src/Dapi/Types/ACHGetTransfer.cs
Outdated
| @@ -0,0 +1,13 @@ | |||
| namespace Dapi.Types { | |||
| public class ACHGetTransfer { | |||
There was a problem hiding this comment.
Rename it to ACHPullTransferInfo.
| /// This is a private constructor to this lib. | ||
| /// </summary> | ||
| [JsonConstructor] | ||
| internal GetACHPullResponse(ACHGetTransfer transfer, string reference, APIStatus status, bool success, string operationID) : |
There was a problem hiding this comment.
This constructor is missing the userInputs, type and msg fields.
No description provided.